<template>
  <i
    class="iconfont icon-fdn-phone"
    :title="$t('common.base.dial')"
    @click="makePhoneCall(phone)"
  ></i>
</template>

<script>
import { ctiCallOut } from '@src/util/ctisdk';

export default {
  name: 'BaseCallPhone',
  props: {
    phone: {
      type: Number | String,
    },
  },
  data() {
    return {};
  },
  methods: {
   async makePhoneCall(tel){
      if(!tel) return
      try {
        ctiCallOut(tel)
      } catch (error) {
        console.error(error);
      }
    },
  },
};
</script>

<style scoped lang="scss">
.icon-fdn-phone {
  color: $color-primary-light-6;
  cursor: pointer;
}
</style>